import request from '@/utils/request'

// 青运-重大事故安全隐患线索举报确认核实 VO
export interface MajorHazardReportVerificationVO {
  id: number // 主键编号
  processInstanceId:string
  reporter: string // 举报人
  reportDate: string|number // 举报时间
  responsibleUnitAndArea: string // 隐患责任单位及部位
  hazardDescription: string // 隐患简要描述
  potentialHarm: string // 可能发生的危害
  safetyMeasuresTaken: string // 采取的安全措施
  isMajorHazard: string // 所举报线索是否为重大隐患 
  hasFeasibleSolution: string // 是否提出合理可行的整改方案
  verificationPerson: string // 确认核实人员
  safetyEnviroDeptHead: string // 安环部负责人
  safetyDirector: string // 安全总监
  startUserSelectAssignees:any
  status:number,
  isApproved: any
   [key: string]: any
}

// 青运-重大事故安全隐患线索举报确认核实 API
export const MajorHazardReportVerificationApi = {
  // 查询青运-重大事故安全隐患线索举报确认核实分页
  getMajorHazardReportVerificationPage: async (params: any) => {
    return await request.get({ url: `/bpm/major-hazard-report-verification/page`, params })
  },

  // 查询青运-重大事故安全隐患线索举报确认核实详情
  getMajorHazardReportVerification: async (id: number) => {
    return await request.get({ url: `/bpm/major-hazard-report-verification/get?id=` + id })
  },

  // 新增青运-重大事故安全隐患线索举报确认核实
  createMajorHazardReportVerification: async (data: MajorHazardReportVerificationVO) => {
    return await request.post({ url: `/bpm/major-hazard-report-verification/create`, data })
  },

  // 修改青运-重大事故安全隐患线索举报确认核实
  updateMajorHazardReportVerification: async (data: MajorHazardReportVerificationVO) => {
    return await request.put({ url: `/bpm/major-hazard-report-verification/update`, data })
  },

  // 删除青运-重大事故安全隐患线索举报确认核实
  deleteMajorHazardReportVerification: async (id: number) => {
    return await request.delete({ url: `/bpm/major-hazard-report-verification/delete?id=` + id })
  },

  // 导出青运-重大事故安全隐患线索举报确认核实 Excel
  exportMajorHazardReportVerification: async (params:any) => {
    return await request.download({ url: `/bpm/major-hazard-report-verification/export-excel`, params })
  },
}
